package com.zby.common.utils;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResultEnum {
    // http状态码
    SUCCESS(200, "成功"),
    FAIL(400, "失败"),
    UNAUTHORIZED(1401, "未授权"),
    FORBIDDEN(1403, "禁止访问"),
    METHOD_NOT_ALLOWED(1405, "不允许的方法"),
    REQUEST_TIMEOUT(1408, "请求超时"),
    TOO_MANY_REQUESTS(1429, "请求过于频繁"),
    BAD_GATEWAY(1502, "网关错误"),
    SERVICE_UNAVAILABLE(1503, "服务不可用"),
    GATEWAY_TIMEOUT(1504, "网关超时"),
    HTTP_VERSION_NOT_SUPPORTED(1505, "HTTP版本不受支持"),
    NETWORK_AUTHENTICATION_REQUIRED(1511, "需要网络认证"),
    UNKNOWN_ERROR(1520, "未知错误"),
    SERVER_ERROR(1521, "服务器错误"),
    SERVICE_UNAVAILABLE_ERROR(1522, "服务不可用"),
    BAD_GATEWAY_ERROR(1523, "网关错误"),
    ORIGIN_ERROR(1524, "源错误"),
    TIMEOUT_ERROR(1525, "超时错误"),
    SSL_HANDSHAKE_ERROR(1526, "SSL握手错误"),
    INVALID_SSL_CERTIFICATE(1527, "无效的SSL证书"),
    INVALID_SSL_CERTIFICATE_CHAIN(1528, "无效的SSL证书链"),
    INVALID_SSL_CERTIFICATE_STATUS_RESPONSE(1529, "无效的SSL证书状态响应"),
    INVALID_SSL_CERTIFICATE_STATUS_RESPONSE_CHAIN(1530, "无效的SSL证书状态响应链"),
    INVALID_SSL_CERTIFICATE_STATUS_RESPONSE_CHAIN_CHAIN(1531, "无效的SSL证书状态响应链链"),
    INVALID_SSL_CERTIFICATE_STATUS_RESPONSE_CHAIN_CHAIN_CHAIN(1532, "无效的SSL证书状态响应链链链"),
    USERNAME_NOT_NULL(10001, "用户名不能为空"),
    PASSWORD_NOT_NULL(10002, "密码不能为空"),
    U_P_ERROR(10003, "用户名或密码错误"),
    USERNAME_DUPLICATE_ERROR(10004, "用户名重复错误"),
    COMMENT_USER_NOT_NULL(10005, "评论用户不能为空"),
    COMMENT_CONTENT_NOT_NULL(10006, "评论内容不能为空"),
    COMMENT_ARTICLE_ID_NOT_NULL(10007, "评论文章id不能为空"),
    COMMENT_PARENT_ID_NOT_NULL(10008, "评论父id不能为空"),
    COMMENT_USER_ID_NOT_NULL(10009, "评论用户id不能为空"),
    COMMENT_ARTICLE_ID_NOT_EXIST(10010, "评论文章id不存在"),
    COMMENT_PARENT_ID_NOT_EXIST(10011, "评论父id不存在"),
    COMMENT_USER_ID_NOT_EXIST(10012, "评论用户id不存在"),
    COMMENT_ARTICLE_ID_NOT_EXIST_OR_DELETED(10013, "评论文章id不存在或已删除"),
    
    COMMENT_PARENT_ID_NOT_EXIST_OR_DELETED(10014, "评论父id不存在或已删除"), TOKEN_NOT_NULL(1534,"token为空" );

    private final Integer code;

    private final String msg;
}
